<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans default-autowire="byName" default-lazy-init="false" default-dependency-check="none">
  <bean id="messagesManager" parent="baseTxService" lazy-init="default" autowire="default" dependency-check="default">
    <property name="target">
      <bean class="cn.firstsoft.modules.message.service.logic.MessagesManager" lazy-init="default" autowire="default" dependency-check="default" />
    </property>
    <property name="transactionAttributes">
      <props>
        <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
        <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
        <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
        <prop key="save*">PROPAGATION_REQUIRED</prop>
        <prop key="update*">PROPAGATION_REQUIRED</prop>
        <prop key="remove*">PROPAGATION_REQUIRED</prop>
        <prop key="send*">PROPAGATION_SUPPORTS</prop>
        <prop key="read*">PROPAGATION_SUPPORTS</prop>
      </props>
    </property>
  </bean>
  <bean id="messagesAttachManager" parent="baseTxService" lazy-init="default" autowire="default" dependency-check="default">
    <property name="target">
      <bean class="cn.firstsoft.modules.message.service.logic.MessagesAttachManager" lazy-init="default" autowire="default" dependency-check="default" />
    </property>
  </bean>
  <bean id="messagesetsManager" parent="baseTxService" lazy-init="default" autowire="default" dependency-check="default">
    <property name="target">
      <bean class="cn.firstsoft.modules.message.service.logic.MessagesetsManager" lazy-init="default" autowire="default" dependency-check="default" />
    </property>
  </bean>
  <bean id="messagesEmailoutManager" parent="baseTxService" lazy-init="default" autowire="default" dependency-check="default">
    <property name="target">
      <bean class="cn.firstsoft.modules.message.service.logic.MessagesEmailoutManager" lazy-init="default" autowire="default" dependency-check="default" />
    </property>
    <property name="postInterceptors">
      <list>
        <ref bean="emailSendAdvisor" />
      </list>
    </property>
  </bean>
  <bean id="emailSendAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor" lazy-init="default" autowire="default" dependency-check="default">
    <property name="advice">
      <ref local="emailSendAdvice" />
    </property>
    <property name="patterns">
      <list>
        <value>.*saveMessagesEmailout.*</value>
      </list>
    </property>
  </bean>
  <bean id="messagesSmsoutManager" parent="baseTxService" lazy-init="default" autowire="default" dependency-check="default">
    <property name="target">
      <bean class="cn.firstsoft.modules.message.service.logic.MessagesSmsoutManager" lazy-init="default" autowire="default" dependency-check="default" />
    </property>
    <!-- 手机短信切面，要发送短信将下面注释打开-->
    <property name="postInterceptors">
      <list>
        <ref bean="shortMessageSenderAdvisor" />
      </list>
    </property>
  </bean>
  <bean id="shortMessageSenderAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor" lazy-init="default" autowire="default" dependency-check="default">
    <property name="advice">
      <ref local="MessageSenderAdvice" />
    </property>
    <property name="patterns">
      <list>
        <value>.*saveMessagesSmsout.*</value>
      </list>
    </property>
  </bean>
  <bean id="emailSendAdvice" class="cn.firstsoft.modules.message.service.EmailSendAdvice" lazy-init="default" autowire="default" dependency-check="default" />
  <bean id="MessageSenderAdvice" class="cn.firstsoft.firstframe.plugins.sms.CommonSMSAdvice" lazy-init="default" autowire="default" dependency-check="default">
    <property name="commonSMSSender" ref="commonSMSSender" />
  </bean>
  <bean name="commonSMSSender" class="cn.firstsoft.firstframe.plugins.sms.CommonSMSSender" init-method="startThread" destroy-method="stopThread" autowire="byName" lazy-init="default" dependency-check="default">
    <!-- 手机短信切面，要发送短信将下面注释打开
    	<property name="commonSMSService" ref="commonSMSService" />
    	-->
    <property name="isTruncate" value="true" />
    <property name="commonSMSService" ref="commonSMSService" />
  </bean>
  <!-- 依照实际情况，打开具体厂家的注释


	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.EieSMSService" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.IflyMsgSender" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.JassonSoftMsgSender" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.KingDeeMsgSender" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.MobsetMsgSender" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.SouthSeaMsgSender" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.SurgeMsgSender" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.XuanwuSMSService" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.YiTuoMsgSender" />
	<bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.SDUnicomMsgSender" />
	-->
  <bean id="commonSMSService" class="cn.firstsoft.firstframe.plugins.sms.impl.WeinaMsgSender" />
</beans>

